﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MasterPage.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<EM.Components.Entities.EM_Campaigns>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Approve | Email Marketing
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Approve</h2>
    <%using (Html.BeginForm())
      { %>
    <table> 
        <tr>
            <th></th>
            <th>
                CampaignID
            </th>
            <th>
                StartDate
            </th>
            <th>
                EndDate
            </th>
            <th>
                CampaignName
            </th>
            <th>
                CampaignDesc
            </th>
            <th>
                CreatedDate
            </th>
            <th>
                CreatedBy
            </th>
        </tr>

    <% foreach (var item in Model)
       { %>
    
        <tr>
            <td>
            <input name="SelectedObjectIds" type="checkbox" value="<%=item.CampaignID %>"/>
            </td>
            <td>
                <%: item.CampaignID %>
            </td>
            <td>
                <%: String.Format("{0:g}", item.StartDate)%>
            </td>
            <td>
                <%: String.Format("{0:g}", item.EndDate)%>
            </td>
            <td>
                <%: item.CampaignName%>
            </td>
            <td>
                <%: item.CampaignDesc%>
            </td>
            <td>
                <%: String.Format("{0:g}", item.CreatedDate)%>
            </td>
            <td>
                <%: item.CreatedBy%>
            </td>
        </tr>
    
    <% } %>

    </table>
    <button name="button" type="submit" value="Approve">Approve</button>
    <%} %>
    <p>
        <%: Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

